<?php

namespace app\common\logic;
use app\common\library\Utils;
use app\common\model\chat\ChatRoom;
use app\common\model\User;
use think\Db;
use think\exception\ValidateException;


/**
 * 统计热门课程
 */
class SystemInfo
{
    public function __construct()
    {
        $this->model = Db::name('system_info');

    }
    /*
     * 系统消息列表
     * */
    public function getList($org_cate_id = 0) {
        $arr = [$org_cate_id, 0];
        $list = $this->model->where('org_cate_id', 'in', $arr)->order('createtime desc')->paginate()->each(function($item, $key){
            $item['createtime'] = Utils::time_format($item['createtime']);
            return $item;
        });;

        return $list;
    }
}
